package com.joinval.modules.sys.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.joinval.common.utils.PageUtils;
import com.joinval.common.utils.Query;
import com.joinval.common.utils.Result;
import com.joinval.modules.sys.dao.SysUserDetailDao;
import com.joinval.modules.sys.entity.SysUserDetail;
import com.joinval.modules.sys.service.SysUserDetailService;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;


@Service("sysUserDetailService")
public class SysUserDetailServiceImpl extends ServiceImpl<SysUserDetailDao, SysUserDetail> implements SysUserDetailService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<SysUserDetail> page = this.page(
                new Query<SysUserDetail>().getPage(params),
                new QueryWrapper<SysUserDetail>()
        );

        return new PageUtils(page);
    }

    @Override
    public int updateOrgInfo(Long userId, String orgLocation) {
        return this.baseMapper.updateOrgInfo(userId,orgLocation);
    }

}
